package io.jft.doll.api

import com.g.base.api.BaseResult
import com.g.base.room.entity.UserEntity
import com.google.gson.JsonObject
import io.jft.doll.room.entity.remote.*
import io.reactivex.Observable
import okhttp3.RequestBody
import retrofit2.http.*

/**
 * Created by G on 2017/11/13 0013.
 */
interface UserApi {
    @POST("user/login")
    fun signIn(@Body map: JsonObject): Observable<BaseResult<UserEntity?>>

    @POST("user/login_out")
    fun signOut(): Observable<BaseResult<Any?>>

    @GET("person/userScore")
    fun remainingSum(): Observable<BaseResult<String?>>

    @GET("person/suggestCharge")
    fun suggestCharge(): Observable<BaseResult<SuggestChargeREntity?>>

    @POST("order/makeOrder")
    fun makeCharge(@Body jsonObject: JsonObject): Observable<BaseResult<MakeChargeREntity?>>

    @GET("person/userMeneylog/{id}")
    fun asyncCharge(@Path("id") id: String): Observable<BaseResult<AsyncChargeRentity?>>

    @POST("person/userMeneylogList")
    fun billsHistory(@Body jsonObject: JsonObject): Observable<BaseResult<List<BillsHistoryREntity>?>>

    @Multipart
    @Headers("Accept:*/*")
    @POST("person/feedback")
    fun postFeedback(@PartMap() params: Map<String, @JvmSuppressWildcards RequestBody>): Observable<BaseResult<Any?>>

    @POST("duiba/login")
    fun getDuiBarAddress(): Observable<BaseResult<String>>

    @POST("person/loginReward")
    fun dailyReward(): Observable<BaseResult<String?>>

    @POST("person/inviteInfo")
    fun getInviteInfo(): Observable<BaseResult<InviteInfoREntity?>>

    @POST("person/inputcode")
    fun inputInviteCode(@Body jsonObject: JsonObject): Observable<BaseResult<Any?>>
}